<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        #box{
            width: 200px;
            height: 200px;
            border: 1px solid #ccc;
            position: absolute;
            left: 0;
            top: 0;
            background: purple;
        }
    </style>
</head>
<body>
<div id="box">
    hello
</div>
</body>
</html>
<script src="js/jquery-1.10.1.js"></script>
<script>
    $(function () {
        $("#box").click(function () {
            var boxWidth = $(this).outerWidth();
            $(this).animate({
                left : boxWidth,
            },1000)
        })

    })
</script>